package saeildamil.ch18.sync;

import javax.swing.JOptionPane;

public class CircleThread implements Runnable {
	int radius;
	SharedArea sharedArea;
	
	public CircleThread(int radius){
		this.radius = radius;
	}
	@Override
	public void run() {
		getArea();
	}
	
	private void getArea() {
		while(sharedArea.isReady != true){
			double result = radius * radius * sharedArea.result;
			JOptionPane.showMessageDialog(null, "원의 넓이는 : " + result);
		}
	}
}
